3.3.99 \(\int \frac {x^2 (d+e x)}{a^2-c^2 x^2} \, dx\)

Optimal. Leaf size=63 \[ -\frac {a (a e+c d) \log (a-c x)}{2 c^4}+\frac {a (c d-a e) \log (a+c x)}{2 c^4}-\frac {d x}{c^2}-\frac {e x^2}{2 c^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {801, 633, 31} \begin {gather*} -\frac {a (a e+c d) \log (a-c x)}{2 c^4}+\frac {a (c d-a e) \log (a+c x)}{2 c^4}-\frac {d x}{c^2}-\frac {e x^2}{2 c^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^2*(d + e*x))/(a^2 - c^2*x^2),x]

[Out]

-((d*x)/c^2) - (e*x^2)/(2*c^2) - (a*(c*d + a*e)*Log[a - c*x])/(2*c^4) + (a*(c*d - a*e)*Log[a + c*x])/(2*c^4)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 633

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[e/2 + (c*d)/(2*q),
Int[1/(-q + c*x), x], x] + Dist[e/2 - (c*d)/(2*q), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[-(a*c)]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rubi steps

\begin {align*} \int \frac {x^2 (d+e x)}{a^2-c^2 x^2} \, dx &=\int \left (-\frac {d}{c^2}-\frac {e x}{c^2}+\frac {a^2 d+a^2 e x}{c^2 \left (a^2-c^2 x^2\right )}\right ) \, dx\\ &=-\frac {d x}{c^2}-\frac {e x^2}{2 c^2}+\frac {\int \frac {a^2 d+a^2 e x}{a^2-c^2 x^2} \, dx}{c^2}\\ &=-\frac {d x}{c^2}-\frac {e x^2}{2 c^2}-\frac {(a (c d-a e)) \int \frac {1}{-a c-c^2 x} \, dx}{2 c^2}+\frac {(a (c d+a e)) \int \frac {1}{a c-c^2 x} \, dx}{2 c^2}\\ &=-\frac {d x}{c^2}-\frac {e x^2}{2 c^2}-\frac {a (c d+a e) \log (a-c x)}{2 c^4}+\frac {a (c d-a e) \log (a+c x)}{2 c^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 56, normalized size = 0.89 \begin {gather*} -\frac {a^2 e \log \left (a^2-c^2 x^2\right )}{2 c^4}+\frac {a d \tanh ^{-1}\left (\frac {c x}{a}\right )}{c^3}-\frac {d x}{c^2}-\frac {e x^2}{2 c^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(d + e*x))/(a^2 - c^2*x^2),x]

[Out]

-((d*x)/c^2) - (e*x^2)/(2*c^2) + (a*d*ArcTanh[(c*x)/a])/c^3 - (a^2*e*Log[a^2 - c^2*x^2])/(2*c^4)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^2 (d+e x)}{a^2-c^2 x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(x^2*(d + e*x))/(a^2 - c^2*x^2),x]

[Out]

IntegrateAlgebraic[(x^2*(d + e*x))/(a^2 - c^2*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 59, normalized size = 0.94 \begin {gather*} -\frac {c^{2} e x^{2} + 2 \, c^{2} d x - {\left (a c d - a^{2} e\right )} \log \left (c x + a\right ) + {\left (a c d + a^{2} e\right )} \log \left (c x - a\right )}{2 \, c^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(-c^2*x^2+a^2),x, algorithm="fricas")

[Out]

-1/2*(c^2*e*x^2 + 2*c^2*d*x - (a*c*d - a^2*e)*log(c*x + a) + (a*c*d + a^2*e)*log(c*x - a))/c^4

________________________________________________________________________________________

giac [A]  time = 0.16, size = 72, normalized size = 1.14 \begin {gather*} \frac {{\left (a c d - a^{2} e\right )} \log \left ({\left | c x + a \right |}\right )}{2 \, c^{4}} - \frac {{\left (a c d + a^{2} e\right )} \log \left ({\left | c x - a \right |}\right )}{2 \, c^{4}} - \frac {c^{2} x^{2} e + 2 \, c^{2} d x}{2 \, c^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(-c^2*x^2+a^2),x, algorithm="giac")

[Out]

1/2*(a*c*d - a^2*e)*log(abs(c*x + a))/c^4 - 1/2*(a*c*d + a^2*e)*log(abs(c*x - a))/c^4 - 1/2*(c^2*x^2*e + 2*c^2
*d*x)/c^4

________________________________________________________________________________________

maple [A]  time = 0.06, size = 78, normalized size = 1.24 \begin {gather*} -\frac {e \,x^{2}}{2 c^{2}}-\frac {a^{2} e \ln \left (c x -a \right )}{2 c^{4}}-\frac {a^{2} e \ln \left (c x +a \right )}{2 c^{4}}-\frac {a d \ln \left (c x -a \right )}{2 c^{3}}+\frac {a d \ln \left (c x +a \right )}{2 c^{3}}-\frac {d x}{c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(e*x+d)/(-c^2*x^2+a^2),x)

[Out]

-1/2/c^2*e*x^2-1/c^2*d*x-1/2/c^4*a^2*ln(c*x+a)*e+1/2/c^3*a*ln(c*x+a)*d-1/2/c^4*a^2*ln(c*x-a)*e-1/2/c^3*a*ln(c*
x-a)*d

________________________________________________________________________________________

maxima [A]  time = 0.53, size = 61, normalized size = 0.97 \begin {gather*} -\frac {e x^{2} + 2 \, d x}{2 \, c^{2}} + \frac {{\left (a c d - a^{2} e\right )} \log \left (c x + a\right )}{2 \, c^{4}} - \frac {{\left (a c d + a^{2} e\right )} \log \left (c x - a\right )}{2 \, c^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(-c^2*x^2+a^2),x, algorithm="maxima")

[Out]

-1/2*(e*x^2 + 2*d*x)/c^2 + 1/2*(a*c*d - a^2*e)*log(c*x + a)/c^4 - 1/2*(a*c*d + a^2*e)*log(c*x - a)/c^4

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 61, normalized size = 0.97 \begin {gather*} -\frac {e\,x^2}{2\,c^2}-\frac {\ln \left (a+c\,x\right )\,\left (a^2\,e-a\,c\,d\right )}{2\,c^4}-\frac {\ln \left (a-c\,x\right )\,\left (e\,a^2+c\,d\,a\right )}{2\,c^4}-\frac {d\,x}{c^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(d + e*x))/(a^2 - c^2*x^2),x)

[Out]

- (e*x^2)/(2*c^2) - (log(a + c*x)*(a^2*e - a*c*d))/(2*c^4) - (log(a - c*x)*(a^2*e + a*c*d))/(2*c^4) - (d*x)/c^
2

________________________________________________________________________________________

sympy [A]  time = 0.47, size = 88, normalized size = 1.40 \begin {gather*} - \frac {a \left (a e - c d\right ) \log {\left (x + \frac {a^{2} e - a \left (a e - c d\right )}{c^{2} d} \right )}}{2 c^{4}} - \frac {a \left (a e + c d\right ) \log {\left (x + \frac {a^{2} e - a \left (a e + c d\right )}{c^{2} d} \right )}}{2 c^{4}} - \frac {d x}{c^{2}} - \frac {e x^{2}}{2 c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(e*x+d)/(-c**2*x**2+a**2),x)

[Out]

-a*(a*e - c*d)*log(x + (a**2*e - a*(a*e - c*d))/(c**2*d))/(2*c**4) - a*(a*e + c*d)*log(x + (a**2*e - a*(a*e +
c*d))/(c**2*d))/(2*c**4) - d*x/c**2 - e*x**2/(2*c**2)

________________________________________________________________________________________